/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgGroupCategory extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgGroupCategory";
	public static final String ALIAS_CATE_ID = "分类ID 主键自增";
	public static final String ALIAS_CATE_NAME = "分类名称";
	public static final String ALIAS_CATE_ORDER = "分类排序";
	public static final String ALIAS_PARENT_CATE_ID = "父分类ID";
	public static final String ALIAS_IMAGE = "分类图片";
	public static final String ALIAS_IS_VALID = "是否有效";
	public static final String ALIAS_CITY_NO = "分类所属的城市";
	public static final String ALIAS_CITY_NAME = "冗余的城市名称";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * 分类ID 主键自增       db_column: cateId 
     */	
	
	private java.lang.Integer cateId;
    /**
     * 分类名称       db_column: cateName 
     */	
	private java.lang.String cateName;
    /**
     * 分类排序       db_column: cateOrder 
     */	
	private java.lang.Integer cateOrder;
    /**
     * 父分类ID       db_column: parentCateId 
     */	
	private java.lang.Integer parentCateId;
    /**
     * 分类图片       db_column: image 
     */	
	private java.lang.String image;
    /**
     * 是否有效       db_column: isValid 
     */	
	
	private java.lang.Integer isValid;
    /**
     * 分类所属的城市       db_column: cityNo 
     */	
	
	private java.lang.Integer cityNo;
    /**
     * 冗余的城市名称       db_column: cityName 
     */	
	private java.lang.String cityName;
	//columns END
	
	private int totalTopicCount ;
	
	 
	private int todayTopicCount ;
	public int getTotalTopicCount() {
		return totalTopicCount;
	}

	public void setTotalTopicCount(int totalTopicCount) {
		this.totalTopicCount = totalTopicCount;
	}


	public int getTodayTopicCount() {
		return todayTopicCount;
	}

	public void setTodayTopicCount(int todayTopicCount) {
		this.todayTopicCount = todayTopicCount;
	}

	public SmgGroupCategory(){
	}

	public SmgGroupCategory(
		java.lang.Integer cateId
	){
		this.cateId = cateId;
	}

	public void setCateId(java.lang.Integer value) {
		this.cateId = value;
	}
	
	public java.lang.Integer getCateId() {
		return this.cateId;
	}
	public void setCateName(java.lang.String value) {
		this.cateName = value;
	}
	
	public java.lang.String getCateName() {
		return this.cateName;
	}
	public void setCateOrder(java.lang.Integer value) {
		this.cateOrder = value;
	}
	
	public java.lang.Integer getCateOrder() {
		return this.cateOrder;
	}
	public void setParentCateId(java.lang.Integer value) {
		this.parentCateId = value;
	}
	
	public java.lang.Integer getParentCateId() {
		return this.parentCateId;
	}
	public void setImage(java.lang.String value) {
		this.image = value;
	}
	
	public java.lang.String getImage() {
		return this.image;
	}
	public void setIsValid(java.lang.Integer value) {
		this.isValid = value;
	}
	
	public java.lang.Integer getIsValid() {
		return this.isValid;
	}
	public void setCityNo(java.lang.Integer value) {
		this.cityNo = value;
	}
	
	public java.lang.Integer getCityNo() {
		return this.cityNo;
	}
	public void setCityName(java.lang.String value) {
		this.cityName = value;
	}
	
	public java.lang.String getCityName() {
		return this.cityName;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("CateId",getCateId())
			.append("CateName",getCateName())
			.append("CateOrder",getCateOrder())
			.append("ParentCateId",getParentCateId())
			.append("Image",getImage())
			.append("IsValid",getIsValid())
			.append("CityNo",getCityNo())
			.append("CityName",getCityName())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getCateId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgGroupCategory == false) return false;
		if(this == obj) return true;
		SmgGroupCategory other = (SmgGroupCategory)obj;
		return new EqualsBuilder()
			.append(getCateId(),other.getCateId())
			.isEquals();
	}
}

